<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE html>
<!-- saved from url=(0031)https://www.i8xiaoshi.com/login -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>i8小时登录</title>

<meta name="renderer" content="webkit">
<meta name="robots" content="nofollow">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<link href="<%=request.getContextPath() %>/common/css/login.min.css" media="all" rel="stylesheet">
<script type="text/javascript" src="<%=request.getContextPath() %>/common/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/common/login/Cookies.js"></script>
<jsp:include page="/common/easyui.jsp"></jsp:include>
<script type="text/javascript">

				function login(){
			
					$.ajax({
						type:"post",
						url:"<%=request.getContextPath()%>/user/login.do",
						data:$("#loginForm").serialize(),
						success:function(info){
							if(info==0){
								$.messager.alert('错误','账号或密码错误');   
							}else{
							
								var is = $("#cookie").prop("checked");
								if(is){
									var name = $("#txt_loginname").val();
									var pwd = $("#txt_password").val();
									if(name!=""&&pwd!=""){
										SetCookie('txt_loginname',name,7);
										SetCookie('txt_password',pwd,7);
									}
								}else{
									ClearCookie("txt_loginname");
									ClearCookie("txt_password");
								}
							
								document.write("<form action='<%=request.getContextPath()%>/user/loginGo.do' method=post name=formx1 style='display:none'>");
								document.write("</form>");
								document.formx1.submit();
							}
						}
					});
				}
		
		$(function(){
			var name = GetCookie("txt_loginname");
			var pwd = GetCookie("txt_password");
			if(name!=null&&pwd!=null){
				$("#txt_loginname").val(name);
				$("#txt_password").val(pwd);
				$("#cookie").attr("checked",true);
			}
			
		});
</script>
</head>
<body class="oflow">
	<div class="wrapper">
		<div class="lg-img"></div>
		<div class="lg-main">
		<form method="post" id="loginForm">
			<div id="js_login" class="lg-cont ">
				<a href="#" class="app-logo"
					title="返回i8小时首页"></a>
				<div class="clear"></div>
				<h1 class="lg-h1 heit">登录</h1>
				<input class="login-txt" id="txt_loginname"  name="loginname" type="text"
					placeholder="请输入登录账号"> <input class="login-txt m-t10"
					id="txt_password" type="password" name="password" value="" placeholder="请输入您的密码">
				<div id="js_show_img_code"></div>
				<div class="oflow m-b20">
					<a href="#"
						class="ft14 lt"><i class="lgbg1 pic_18"></i>忘记密码</a> 
						
						<label class="rt lg-save-lb">
						<input type="checkbox" value="1" id='cookie'/>记住密码
					<!--一周内记住登录状态--> </label>
				</div>
				<div>
					<span onclick="login()" class="login-btn">登&nbsp;&nbsp;录</span><a
						class="regiter-btn" href="register.jsp">注&nbsp;&nbsp;册</a>
				</div>
			</div>
			</form>
		</div>
	</div>
</body>
</html>